<template>
  <div class="my-container">
    <div class="my-header">
      <div class="pic-container">
        <div class="pic-box">
          <van-icon name="user" />
        </div>
      </div>
      <div class="user-info">
        <div class="nickname">{{userStore.userInfo.nickName}}</div>
        <div class="dept-name">{{ userStore.userInfo && userStore.userInfo.dept?userStore.userInfo.dept.deptName:'' }}</div>
      </div>

    </div>
    <van-cell-group  style="width: 100%">
      <van-cell title="版本" value="1.01" />
    </van-cell-group>
  </div>
</template>

<script setup>

import { onMounted } from 'vue'
import useUserStore from '@/stores/user.js'

const userStore = useUserStore()
onMounted(()=>{
  console.log()
})

</script>

<style scoped lang="less">
  .my-container{
    height: 150px;
    width: 100%;
    background-color: #38b9fa;
    display: flex;
    align-items: center;
    flex-direction: column;
    .my-header{
      width: 100%;
      height: 100%;
      display: flex;
      justify-content: space-between;
      align-items: center;
      .pic-container{
        width: 150px;
        height: 150px;
        display: flex;
        align-items: center;
        justify-content: center;
        .pic-box{
          width: 80px;
          height: 80px;
          border-radius: 50%;
          background-color: #f2f2f2;
          display: flex;
          align-items: center;
          justify-content: center;
          font-size: 50px;
        }

      }
      .user-info{
        width:calc(100% - 150px);
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        color:#fff;
        .nickname{
          font-weight: bold;
          font-size: 20px;
        }
        .dept-name{
          color:#eee;
        }
      }
    }
  }
</style>
